package it.softphone.commons.json.server.converter;


import it.softphone.commons.json.server.JSONConverter;
import it.softphone.commons.json.server.JSONObject;


public class JSONStringConverter implements JSONConverter<String> {

	@SuppressWarnings("rawtypes")
	public Object convert(Class type, Object value) {
		if( JSONObject.NULL==value || value==null ) return null;
		
		return value;
	}

	public Object convert(String value) {
		return (value==null) ? JSONObject.NULL : value;
	}

}
